export default function () {
  let deviceWidth = document.documentElement.clientWidth || window.innerWidth;
  if(deviceWidth > 750) {
    deviceWidth = 750
  }
  if(deviceWidth <= 320) {
    deviceWidth = 320
  }
  document.documentElement.style.fontSize = (deviceWidth / 7.5) + 'px'
  console.log('femConfig',document.documentElement.style.fontSize)

  // 禁止双击放大
  document.documentElement.addEventListener('touchstart', (event)=>{
    if (event.touches.length > 1) {
      event.preventDefault()
    }
  }, false)
  let lastTouchEnd = 0
  document.documentElement.addEventListener('touchend',()=>{
    let now = Date.now()
    if(now - lastTouchEnd <=300){
      event.preventDefault()
    }
    lastTouchEnd = now
  },false)
}